<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.js"></script>
    <style>
        #content1{
            width: 1020px;
            height: 400px;
        }
    </style>
</head>

<layout name="Iflayout"/>
<div class="xyh-content">

    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em>
                修改产品
            </h3>
        </div>

    </div>


    <div class="row">
        <div class="col-lg-12">

            <form method='post' class="form-horizontal" id="form_do" name="form_do" action="/xyhai.php?s=/Product/edit">

                <div class="form-group">
                    <label for="inputTtitle" class="col-sm-2 control-label">产品名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="title" id="inputTtitle" value="{$list['title']}" class="form-control" placeholder="产品名称" required="required" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputColor" class="col-sm-2 control-label">标题颜色</label>
                    <div class="col-sm-5">
                        <input type="text" name="color" id="inputColor" value="#ed008c" class="form-control  iColorPicker" placeholder="标题颜色" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputColor" class="col-sm-2 control-label">自定义属性</label>
                    <div class="col-sm-9">
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='1'   checked="checked" /> 图片</label>
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='2'    /> 头条</label>
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='4'    /> 推荐</label>
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='8'    /> 特荐</label>
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='16'    /> 幻灯</label>
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='32' id="CK_JumpUrl"   /> 跳转</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='64'    /> 其他</label>
                    </div>
                </div>

                <div class="form-group" id="JumpUrlDiv" style="display:none;">
                    <label for="inputJumpurl" class="col-sm-2 control-label">跳转网址</label>
                    <div class="col-sm-9">
                        <input type="text" name="jumpurl" id="inputJumpurl" value="" class="form-control" placeholder="跳转网址" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputProName" class="col-sm-2 control-label">所属栏目</label>
                    <div class="col-sm-9">
                        <select name="cid" class="form-control">
                            <foreach name="lists" item="lists">
                            <option value="{$list['cid']}"{$lists['id']==$list['cid'] ? "selected" : ""}>{$lists['name']}</option>
                            </foreach>

                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="BrowerPicture" class="col-sm-2 control-label">产品图片</label>
                    <div class="col-sm-9">
                        <div class="btn btn-success up-picture-btn">
                            <span><em class="glyphicon glyphicon-plus-sign"></em>上传多图</span>
                            <input id="picture_upload" type="file" name="mypic1">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="" class="col-sm-2 control-label"></label>
                    <div class="col-sm-9">
                        <div class="picture_tip"></div>
                        <div id="picture_show">
                            <div class="picture_item"><img src="{$list['litpic']}" width="120"><div class="picture_del">删除</div><div class="picture_go_up">前移</div><input type="hidden" name="pictureurls[]" value="http://img9.xyhcms.com/201410/53391bf80a62e.jpg" /></div>							</div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputKeywords" class="col-sm-2 control-label">关键词</label>
                    <div class="col-sm-9">
                        <input type="text" name="keywords" id="inputKeywords" class="form-control" value="" placeholder="多关键词之间用“,”隔开" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputDescription" class="col-sm-2 control-label">摘要</label>
                    <div class="col-sm-9">
                        <textarea name="description" id="inputDescription" class="form-control">{$list['description']}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputAuthor" class="col-sm-2 control-label">价格</label>
                    <div class="col-sm-9">
                        <input type="text" name="price" id="inputPrice" value="{$list['marketprice']}" class="form-control"  placeholder="价格" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputBrand" class="col-sm-2 control-label">品牌</label>
                    <div class="col-sm-9">
                        <input type="text" name="brand" id="inputBrand" value="{$list['brand']}" class="form-control"  placeholder="品牌" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputUnits" class="col-sm-2 control-label">单位</label>
                    <div class="col-sm-9">
                        <input type="text" name="units" id="inputUnits" value="{$list['units']}" class="form-control" placeholder="单位" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputSpecification" class="col-sm-2 control-label">规格</label>
                    <div class="col-sm-9">
                        <input type="text" name="specification" id="inputSpecification" value="{$list['specification']}" class="form-control" placeholder="规格" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputContent" class="col-sm-2 control-label">内容</label>
                    <div class="col-sm-9">
                        <textarea name="content" id="inputContent" style="height: 370px;">{$list['content']}</textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputPublishtime" class="col-sm-2 control-label">发布时间</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="publishtime" id="inputPublishtime" value="{$list['publishtime']|date='Y-m-d H:i:s',###}">
                        <script type="text/javascript">
                            Calendar.setup({
                                weekNumbers: true,
                                inputField : "inputPublishtime",
                                trigger    : "inputPublishtime",
                                dateFormat: "%Y-%m-%d %H:%M:%S",
                                showTime: true,
                                minuteStep: 1,
                                onSelect   : function() {this.hide();}
                            });
                        </script>
                    </div>
                </div>


                <div class="form-group">
                    <label for="inputName" class="col-sm-2 control-label">评论</label>
                    <div class="col-sm-9">
                        <label class="radio-inline">
                            <input type="radio" name="commentflag" value="1" checked="checked" />允许
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="commentflag" value="0"  />禁止
                        </label>
                    </div>
                </div>

                <div class="row margin-botton-large">
                    <div class="col-sm-offset-2 col-sm-9">
                        <input type="hidden" name="id" value="3" />
                        <input type="hidden" name="pid" value="5" />
                        <div class="btn-group">
                            <button type="submit" class="btn btn-primary"> <i class="glyphicon glyphicon-saved"></i>
                                保存
                            </button>
                            <button type="button" onclick="goUrl('/xyhai.php?s=/Product/index')" class="btn btn-default"> <i class="glyphicon glyphicon-chevron-left"></i>
                                返回
                            </button>
                        </div>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>




<script type="text/javascript">

    var ue = UE.getEditor('inputContent');
    ue.ready(function() {
        ue.setHeight(250);
        //设置编辑器的内容
        // ue.setContent('hello');
        // //获取html内容，返回: <p>hello</p>
        // var html = ue.getContent();
        //获取纯文本内容，返回: hello
        // var txt = ue.getContentTxt();
    });

</script>


